/** Cette fonction manipule la ToC des utilisateurs loggués
 *
 */
 
function showTocToggle(showtxt,hidetxt) {
  if(document.getElementById) {
		show = '<img src="C:/Program Files/wamp/www/balloon/files/imgFiles/arrow_down.gif" alt="'+showtxt+'">';
		hide = '<img src="C:/Program Files/wamp/www/balloon/files/imgFiles/arrow_up.gif" alt="'+hidetxt+'">';

    document.writeln('<div class=\'toctoggle\'><a href="javascript:toggleToc()" class="toc">' +
    '<span id="showlink" style="display:none;">' + show + '</span>' +
    '<span id="hidelink">' + hide + '</span>'
    + '</a></div>');
  }
} 
 
 
 
function toggleToc() {
  var toc = document.getElementById('tocinside');
  var showlink=document.getElementById('showlink');
  var hidelink=document.getElementById('hidelink');
  if(toc.style.display == 'none') {
    toc.style.display = tocWas;
    hidelink.style.display='';
    showlink.style.display='none';
  } else {
    tocWas = toc.style.display;
    toc.style.display = 'none';
    hidelink.style.display='none';
    showlink.style.display='';
  }
}


// Ferme la ToC

function closeToc() {
  var toc = document.getElementById('tocinside');
  var showlink=document.getElementById('showlink');
  var hidelink=document.getElementById('hidelink');
  if(toc.style.display == 'none') {
    return
  } else {
    tocWas = toc.style.display;
    toc.style.display = 'none';
    hidelink.style.display='none';
    showlink.style.display='';
  }


}